#pragma once
// MESSAGE XAP_SBG_GPS_VEL_MSG PACKING

#define MAVLINK_MSG_ID_XAP_SBG_GPS_VEL_MSG 20809


typedef struct __mavlink_xap_sbg_gps_vel_msg_t {
 uint32_t time_boot_ms; /*< [ms] Timestamp (milliseconds since system boot)*/
 uint32_t gps_vel_status; /*<   GPS velocity fix and status bitmask */
 uint32_t gps_tow; /*<   GPS Time of Week, ms */
 float vel_n; /*<   Velocity in North direction, m/s */
 float vel_e; /*<   Velocity in East direction, m/s */
 float vel_d; /*<   Velocity in Down direction, m/s */
 float vel_acc_n; /*<   1b Accuracy in North direction, m/s */
 float vel_acc_e; /*<   1b Accuracy in East direction, m/s */
 float vel_acc_d; /*<   1b Accuracy in Down direction, m/s */
 float course; /*<   True direction of motion over ground (0 to 360 deg), deg */
 float course_acc; /*<   1b course accuracy (0 to 360 deg), deg */
 int8_t sbg_id; /*<   Sbg device id */
 int8_t gps_id; /*<   Gps device id */
} mavlink_xap_sbg_gps_vel_msg_t;

#define MAVLINK_MSG_ID_XAP_SBG_GPS_VEL_MSG_LEN 46
#define MAVLINK_MSG_ID_XAP_SBG_GPS_VEL_MSG_MIN_LEN 46
#define MAVLINK_MSG_ID_20809_LEN 46
#define MAVLINK_MSG_ID_20809_MIN_LEN 46

#define MAVLINK_MSG_ID_XAP_SBG_GPS_VEL_MSG_CRC 125
#define MAVLINK_MSG_ID_20809_CRC 125



#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_XAP_SBG_GPS_VEL_MSG { \
    20809, \
    "XAP_SBG_GPS_VEL_MSG", \
    13, \
    {  { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_xap_sbg_gps_vel_msg_t, time_boot_ms) }, \
         { "sbg_id", NULL, MAVLINK_TYPE_INT8_T, 0, 44, offsetof(mavlink_xap_sbg_gps_vel_msg_t, sbg_id) }, \
         { "gps_id", NULL, MAVLINK_TYPE_INT8_T, 0, 45, offsetof(mavlink_xap_sbg_gps_vel_msg_t, gps_id) }, \
         { "gps_vel_status", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_xap_sbg_gps_vel_msg_t, gps_vel_status) }, \
         { "gps_tow", NULL, MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_xap_sbg_gps_vel_msg_t, gps_tow) }, \
         { "vel_n", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_xap_sbg_gps_vel_msg_t, vel_n) }, \
         { "vel_e", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_xap_sbg_gps_vel_msg_t, vel_e) }, \
         { "vel_d", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_xap_sbg_gps_vel_msg_t, vel_d) }, \
         { "vel_acc_n", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_xap_sbg_gps_vel_msg_t, vel_acc_n) }, \
         { "vel_acc_e", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_xap_sbg_gps_vel_msg_t, vel_acc_e) }, \
         { "vel_acc_d", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_xap_sbg_gps_vel_msg_t, vel_acc_d) }, \
         { "course", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_xap_sbg_gps_vel_msg_t, course) }, \
         { "course_acc", NULL, MAVLINK_TYPE_FLOAT, 0, 40, offsetof(mavlink_xap_sbg_gps_vel_msg_t, course_acc) }, \
         } \
}
#else
#define MAVLINK_MESSAGE_INFO_XAP_SBG_GPS_VEL_MSG { \
    "XAP_SBG_GPS_VEL_MSG", \
    13, \
    {  { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_xap_sbg_gps_vel_msg_t, time_boot_ms) }, \
         { "sbg_id", NULL, MAVLINK_TYPE_INT8_T, 0, 44, offsetof(mavlink_xap_sbg_gps_vel_msg_t, sbg_id) }, \
         { "gps_id", NULL, MAVLINK_TYPE_INT8_T, 0, 45, offsetof(mavlink_xap_sbg_gps_vel_msg_t, gps_id) }, \
         { "gps_vel_status", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_xap_sbg_gps_vel_msg_t, gps_vel_status) }, \
         { "gps_tow", NULL, MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_xap_sbg_gps_vel_msg_t, gps_tow) }, \
         { "vel_n", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_xap_sbg_gps_vel_msg_t, vel_n) }, \
         { "vel_e", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_xap_sbg_gps_vel_msg_t, vel_e) }, \
         { "vel_d", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_xap_sbg_gps_vel_msg_t, vel_d) }, \
         { "vel_acc_n", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_xap_sbg_gps_vel_msg_t, vel_acc_n) }, \
         { "vel_acc_e", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_xap_sbg_gps_vel_msg_t, vel_acc_e) }, \
         { "vel_acc_d", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_xap_sbg_gps_vel_msg_t, vel_acc_d) }, \
         { "course", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_xap_sbg_gps_vel_msg_t, course) }, \
         { "course_acc", NULL, MAVLINK_TYPE_FLOAT, 0, 40, offsetof(mavlink_xap_sbg_gps_vel_msg_t, course_acc) }, \
         } \
}
#endif

/**
 * @brief Pack a xap_sbg_gps_vel_msg message
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param msg The MAVLink message to compress the data into
 *
 * @param time_boot_ms [ms] Timestamp (milliseconds since system boot)
 * @param sbg_id   Sbg device id 
 * @param gps_id   Gps device id 
 * @param gps_vel_status   GPS velocity fix and status bitmask 
 * @param gps_tow   GPS Time of Week, ms 
 * @param vel_n   Velocity in North direction, m/s 
 * @param vel_e   Velocity in East direction, m/s 
 * @param vel_d   Velocity in Down direction, m/s 
 * @param vel_acc_n   1b Accuracy in North direction, m/s 
 * @param vel_acc_e   1b Accuracy in East direction, m/s 
 * @param vel_acc_d   1b Accuracy in Down direction, m/s 
 * @param course   True direction of motion over ground (0 to 360 deg), deg 
 * @param course_acc   1b course accuracy (0 to 360 deg), deg 
 * @return length of the message in bytes (excluding serial stream start sign)
 */
static inline uint16_t mavlink_msg_xap_sbg_gps_vel_msg_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
                               uint32_t time_boot_ms, int8_t sbg_id, int8_t gps_id, uint32_t gps_vel_status, uint32_t gps_tow, float vel_n, float vel_e, float vel_d, float vel_acc_n, float vel_acc_e, float vel_acc_d, float course, float course_acc)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_XAP_SBG_GPS_VEL_MSG_LEN];
    _mav_put_uint32_t(buf, 0, time_boot_ms);
    _mav_put_uint32_t(buf, 4, gps_vel_status);
    _mav_put_uint32_t(buf, 8, gps_tow);
    _mav_put_float(buf, 12, vel_n);
    _mav_put_float(buf, 16, vel_e);
    _mav_put_float(buf, 20, vel_d);
    _mav_put_float(buf, 24, vel_acc_n);
    _mav_put_float(buf, 28, vel_acc_e);
    _mav_put_float(buf, 32, vel_acc_d);
    _mav_put_float(buf, 36, course);
    _mav_put_float(buf, 40, course_acc);
    _mav_put_int8_t(buf, 44, sbg_id);
    _mav_put_int8_t(buf, 45, gps_id);

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_XAP_SBG_GPS_VEL_MSG_LEN);
#else
    mavlink_xap_sbg_gps_vel_msg_t packet;
    packet.time_boot_ms = time_boot_ms;
    packet.gps_vel_status = gps_vel_status;
    packet.gps_tow = gps_tow;
    packet.vel_n = vel_n;
    packet.vel_e = vel_e;
    packet.vel_d = vel_d;
    packet.vel_acc_n = vel_acc_n;
    packet.vel_acc_e = vel_acc_e;
    packet.vel_acc_d = vel_acc_d;
    packet.course = course;
    packet.course_acc = course_acc;
    packet.sbg_id = sbg_id;
    packet.gps_id = gps_id;

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_XAP_SBG_GPS_VEL_MSG_LEN);
#endif

    msg->msgid = MAVLINK_MSG_ID_XAP_SBG_GPS_VEL_MSG;
    return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_XAP_SBG_GPS_VEL_MSG_MIN_LEN, MAVLINK_MSG_ID_XAP_SBG_GPS_VEL_MSG_LEN, MAVLINK_MSG_ID_XAP_SBG_GPS_VEL_MSG_CRC);
}

/**
 * @brief Pack a xap_sbg_gps_vel_msg message on a channel
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param chan The MAVLink channel this message will be sent over
 * @param msg The MAVLink message to compress the data into
 * @param time_boot_ms [ms] Timestamp (milliseconds since system boot)
 * @param sbg_id   Sbg device id 
 * @param gps_id   Gps device id 
 * @param gps_vel_status   GPS velocity fix and status bitmask 
 * @param gps_tow   GPS Time of Week, ms 
 * @param vel_n   Velocity in North direction, m/s 
 * @param vel_e   Velocity in East direction, m/s 
 * @param vel_d   Velocity in Down direction, m/s 
 * @param vel_acc_n   1b Accuracy in North direction, m/s 
 * @param vel_acc_e   1b Accuracy in East direction, m/s 
 * @param vel_acc_d   1b Accuracy in Down direction, m/s 
 * @param course   True direction of motion over ground (0 to 360 deg), deg 
 * @param course_acc   1b course accuracy (0 to 360 deg), deg 
 * @return length of the message in bytes (excluding serial stream start sign)
 */
static inline uint16_t mavlink_msg_xap_sbg_gps_vel_msg_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
                               mavlink_message_t* msg,
                                   uint32_t time_boot_ms,int8_t sbg_id,int8_t gps_id,uint32_t gps_vel_status,uint32_t gps_tow,float vel_n,float vel_e,float vel_d,float vel_acc_n,float vel_acc_e,float vel_acc_d,float course,float course_acc)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_XAP_SBG_GPS_VEL_MSG_LEN];
    _mav_put_uint32_t(buf, 0, time_boot_ms);
    _mav_put_uint32_t(buf, 4, gps_vel_status);
    _mav_put_uint32_t(buf, 8, gps_tow);
    _mav_put_float(buf, 12, vel_n);
    _mav_put_float(buf, 16, vel_e);
    _mav_put_float(buf, 20, vel_d);
    _mav_put_float(buf, 24, vel_acc_n);
    _mav_put_float(buf, 28, vel_acc_e);
    _mav_put_float(buf, 32, vel_acc_d);
    _mav_put_float(buf, 36, course);
    _mav_put_float(buf, 40, course_acc);
    _mav_put_int8_t(buf, 44, sbg_id);
    _mav_put_int8_t(buf, 45, gps_id);

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_XAP_SBG_GPS_VEL_MSG_LEN);
#else
    mavlink_xap_sbg_gps_vel_msg_t packet;
    packet.time_boot_ms = time_boot_ms;
    packet.gps_vel_status = gps_vel_status;
    packet.gps_tow = gps_tow;
    packet.vel_n = vel_n;
    packet.vel_e = vel_e;
    packet.vel_d = vel_d;
    packet.vel_acc_n = vel_acc_n;
    packet.vel_acc_e = vel_acc_e;
    packet.vel_acc_d = vel_acc_d;
    packet.course = course;
    packet.course_acc = course_acc;
    packet.sbg_id = sbg_id;
    packet.gps_id = gps_id;

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_XAP_SBG_GPS_VEL_MSG_LEN);
#endif

    msg->msgid = MAVLINK_MSG_ID_XAP_SBG_GPS_VEL_MSG;
    return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_XAP_SBG_GPS_VEL_MSG_MIN_LEN, MAVLINK_MSG_ID_XAP_SBG_GPS_VEL_MSG_LEN, MAVLINK_MSG_ID_XAP_SBG_GPS_VEL_MSG_CRC);
}

/**
 * @brief Encode a xap_sbg_gps_vel_msg struct
 *
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param msg The MAVLink message to compress the data into
 * @param xap_sbg_gps_vel_msg C-struct to read the message contents from
 */
static inline uint16_t mavlink_msg_xap_sbg_gps_vel_msg_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_xap_sbg_gps_vel_msg_t* xap_sbg_gps_vel_msg)
{
    return mavlink_msg_xap_sbg_gps_vel_msg_pack(system_id, component_id, msg, xap_sbg_gps_vel_msg->time_boot_ms, xap_sbg_gps_vel_msg->sbg_id, xap_sbg_gps_vel_msg->gps_id, xap_sbg_gps_vel_msg->gps_vel_status, xap_sbg_gps_vel_msg->gps_tow, xap_sbg_gps_vel_msg->vel_n, xap_sbg_gps_vel_msg->vel_e, xap_sbg_gps_vel_msg->vel_d, xap_sbg_gps_vel_msg->vel_acc_n, xap_sbg_gps_vel_msg->vel_acc_e, xap_sbg_gps_vel_msg->vel_acc_d, xap_sbg_gps_vel_msg->course, xap_sbg_gps_vel_msg->course_acc);
}

/**
 * @brief Encode a xap_sbg_gps_vel_msg struct on a channel
 *
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param chan The MAVLink channel this message will be sent over
 * @param msg The MAVLink message to compress the data into
 * @param xap_sbg_gps_vel_msg C-struct to read the message contents from
 */
static inline uint16_t mavlink_msg_xap_sbg_gps_vel_msg_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_xap_sbg_gps_vel_msg_t* xap_sbg_gps_vel_msg)
{
    return mavlink_msg_xap_sbg_gps_vel_msg_pack_chan(system_id, component_id, chan, msg, xap_sbg_gps_vel_msg->time_boot_ms, xap_sbg_gps_vel_msg->sbg_id, xap_sbg_gps_vel_msg->gps_id, xap_sbg_gps_vel_msg->gps_vel_status, xap_sbg_gps_vel_msg->gps_tow, xap_sbg_gps_vel_msg->vel_n, xap_sbg_gps_vel_msg->vel_e, xap_sbg_gps_vel_msg->vel_d, xap_sbg_gps_vel_msg->vel_acc_n, xap_sbg_gps_vel_msg->vel_acc_e, xap_sbg_gps_vel_msg->vel_acc_d, xap_sbg_gps_vel_msg->course, xap_sbg_gps_vel_msg->course_acc);
}

/**
 * @brief Send a xap_sbg_gps_vel_msg message
 * @param chan MAVLink channel to send the message
 *
 * @param time_boot_ms [ms] Timestamp (milliseconds since system boot)
 * @param sbg_id   Sbg device id 
 * @param gps_id   Gps device id 
 * @param gps_vel_status   GPS velocity fix and status bitmask 
 * @param gps_tow   GPS Time of Week, ms 
 * @param vel_n   Velocity in North direction, m/s 
 * @param vel_e   Velocity in East direction, m/s 
 * @param vel_d   Velocity in Down direction, m/s 
 * @param vel_acc_n   1b Accuracy in North direction, m/s 
 * @param vel_acc_e   1b Accuracy in East direction, m/s 
 * @param vel_acc_d   1b Accuracy in Down direction, m/s 
 * @param course   True direction of motion over ground (0 to 360 deg), deg 
 * @param course_acc   1b course accuracy (0 to 360 deg), deg 
 */
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS

static inline void mavlink_msg_xap_sbg_gps_vel_msg_send(mavlink_channel_t chan, uint32_t time_boot_ms, int8_t sbg_id, int8_t gps_id, uint32_t gps_vel_status, uint32_t gps_tow, float vel_n, float vel_e, float vel_d, float vel_acc_n, float vel_acc_e, float vel_acc_d, float course, float course_acc)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_XAP_SBG_GPS_VEL_MSG_LEN];
    _mav_put_uint32_t(buf, 0, time_boot_ms);
    _mav_put_uint32_t(buf, 4, gps_vel_status);
    _mav_put_uint32_t(buf, 8, gps_tow);
    _mav_put_float(buf, 12, vel_n);
    _mav_put_float(buf, 16, vel_e);
    _mav_put_float(buf, 20, vel_d);
    _mav_put_float(buf, 24, vel_acc_n);
    _mav_put_float(buf, 28, vel_acc_e);
    _mav_put_float(buf, 32, vel_acc_d);
    _mav_put_float(buf, 36, course);
    _mav_put_float(buf, 40, course_acc);
    _mav_put_int8_t(buf, 44, sbg_id);
    _mav_put_int8_t(buf, 45, gps_id);

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_XAP_SBG_GPS_VEL_MSG, buf, MAVLINK_MSG_ID_XAP_SBG_GPS_VEL_MSG_MIN_LEN, MAVLINK_MSG_ID_XAP_SBG_GPS_VEL_MSG_LEN, MAVLINK_MSG_ID_XAP_SBG_GPS_VEL_MSG_CRC);
#else
    mavlink_xap_sbg_gps_vel_msg_t packet;
    packet.time_boot_ms = time_boot_ms;
    packet.gps_vel_status = gps_vel_status;
    packet.gps_tow = gps_tow;
    packet.vel_n = vel_n;
    packet.vel_e = vel_e;
    packet.vel_d = vel_d;
    packet.vel_acc_n = vel_acc_n;
    packet.vel_acc_e = vel_acc_e;
    packet.vel_acc_d = vel_acc_d;
    packet.course = course;
    packet.course_acc = course_acc;
    packet.sbg_id = sbg_id;
    packet.gps_id = gps_id;

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_XAP_SBG_GPS_VEL_MSG, (const char *)&packet, MAVLINK_MSG_ID_XAP_SBG_GPS_VEL_MSG_MIN_LEN, MAVLINK_MSG_ID_XAP_SBG_GPS_VEL_MSG_LEN, MAVLINK_MSG_ID_XAP_SBG_GPS_VEL_MSG_CRC);
#endif
}

/**
 * @brief Send a xap_sbg_gps_vel_msg message
 * @param chan MAVLink channel to send the message
 * @param struct The MAVLink struct to serialize
 */
static inline void mavlink_msg_xap_sbg_gps_vel_msg_send_struct(mavlink_channel_t chan, const mavlink_xap_sbg_gps_vel_msg_t* xap_sbg_gps_vel_msg)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    mavlink_msg_xap_sbg_gps_vel_msg_send(chan, xap_sbg_gps_vel_msg->time_boot_ms, xap_sbg_gps_vel_msg->sbg_id, xap_sbg_gps_vel_msg->gps_id, xap_sbg_gps_vel_msg->gps_vel_status, xap_sbg_gps_vel_msg->gps_tow, xap_sbg_gps_vel_msg->vel_n, xap_sbg_gps_vel_msg->vel_e, xap_sbg_gps_vel_msg->vel_d, xap_sbg_gps_vel_msg->vel_acc_n, xap_sbg_gps_vel_msg->vel_acc_e, xap_sbg_gps_vel_msg->vel_acc_d, xap_sbg_gps_vel_msg->course, xap_sbg_gps_vel_msg->course_acc);
#else
    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_XAP_SBG_GPS_VEL_MSG, (const char *)xap_sbg_gps_vel_msg, MAVLINK_MSG_ID_XAP_SBG_GPS_VEL_MSG_MIN_LEN, MAVLINK_MSG_ID_XAP_SBG_GPS_VEL_MSG_LEN, MAVLINK_MSG_ID_XAP_SBG_GPS_VEL_MSG_CRC);
#endif
}

#if MAVLINK_MSG_ID_XAP_SBG_GPS_VEL_MSG_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
  This varient of _send() can be used to save stack space by re-using
  memory from the receive buffer.  The caller provides a
  mavlink_message_t which is the size of a full mavlink message. This
  is usually the receive buffer for the channel, and allows a reply to an
  incoming message with minimum stack space usage.
 */
static inline void mavlink_msg_xap_sbg_gps_vel_msg_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan,  uint32_t time_boot_ms, int8_t sbg_id, int8_t gps_id, uint32_t gps_vel_status, uint32_t gps_tow, float vel_n, float vel_e, float vel_d, float vel_acc_n, float vel_acc_e, float vel_acc_d, float course, float course_acc)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char *buf = (char *)msgbuf;
    _mav_put_uint32_t(buf, 0, time_boot_ms);
    _mav_put_uint32_t(buf, 4, gps_vel_status);
    _mav_put_uint32_t(buf, 8, gps_tow);
    _mav_put_float(buf, 12, vel_n);
    _mav_put_float(buf, 16, vel_e);
    _mav_put_float(buf, 20, vel_d);
    _mav_put_float(buf, 24, vel_acc_n);
    _mav_put_float(buf, 28, vel_acc_e);
    _mav_put_float(buf, 32, vel_acc_d);
    _mav_put_float(buf, 36, course);
    _mav_put_float(buf, 40, course_acc);
    _mav_put_int8_t(buf, 44, sbg_id);
    _mav_put_int8_t(buf, 45, gps_id);

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_XAP_SBG_GPS_VEL_MSG, buf, MAVLINK_MSG_ID_XAP_SBG_GPS_VEL_MSG_MIN_LEN, MAVLINK_MSG_ID_XAP_SBG_GPS_VEL_MSG_LEN, MAVLINK_MSG_ID_XAP_SBG_GPS_VEL_MSG_CRC);
#else
    mavlink_xap_sbg_gps_vel_msg_t *packet = (mavlink_xap_sbg_gps_vel_msg_t *)msgbuf;
    packet->time_boot_ms = time_boot_ms;
    packet->gps_vel_status = gps_vel_status;
    packet->gps_tow = gps_tow;
    packet->vel_n = vel_n;
    packet->vel_e = vel_e;
    packet->vel_d = vel_d;
    packet->vel_acc_n = vel_acc_n;
    packet->vel_acc_e = vel_acc_e;
    packet->vel_acc_d = vel_acc_d;
    packet->course = course;
    packet->course_acc = course_acc;
    packet->sbg_id = sbg_id;
    packet->gps_id = gps_id;

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_XAP_SBG_GPS_VEL_MSG, (const char *)packet, MAVLINK_MSG_ID_XAP_SBG_GPS_VEL_MSG_MIN_LEN, MAVLINK_MSG_ID_XAP_SBG_GPS_VEL_MSG_LEN, MAVLINK_MSG_ID_XAP_SBG_GPS_VEL_MSG_CRC);
#endif
}
#endif

#endif

// MESSAGE XAP_SBG_GPS_VEL_MSG UNPACKING


/**
 * @brief Get field time_boot_ms from xap_sbg_gps_vel_msg message
 *
 * @return [ms] Timestamp (milliseconds since system boot)
 */
static inline uint32_t mavlink_msg_xap_sbg_gps_vel_msg_get_time_boot_ms(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint32_t(msg,  0);
}

/**
 * @brief Get field sbg_id from xap_sbg_gps_vel_msg message
 *
 * @return   Sbg device id 
 */
static inline int8_t mavlink_msg_xap_sbg_gps_vel_msg_get_sbg_id(const mavlink_message_t* msg)
{
    return _MAV_RETURN_int8_t(msg,  44);
}

/**
 * @brief Get field gps_id from xap_sbg_gps_vel_msg message
 *
 * @return   Gps device id 
 */
static inline int8_t mavlink_msg_xap_sbg_gps_vel_msg_get_gps_id(const mavlink_message_t* msg)
{
    return _MAV_RETURN_int8_t(msg,  45);
}

/**
 * @brief Get field gps_vel_status from xap_sbg_gps_vel_msg message
 *
 * @return   GPS velocity fix and status bitmask 
 */
static inline uint32_t mavlink_msg_xap_sbg_gps_vel_msg_get_gps_vel_status(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint32_t(msg,  4);
}

/**
 * @brief Get field gps_tow from xap_sbg_gps_vel_msg message
 *
 * @return   GPS Time of Week, ms 
 */
static inline uint32_t mavlink_msg_xap_sbg_gps_vel_msg_get_gps_tow(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint32_t(msg,  8);
}

/**
 * @brief Get field vel_n from xap_sbg_gps_vel_msg message
 *
 * @return   Velocity in North direction, m/s 
 */
static inline float mavlink_msg_xap_sbg_gps_vel_msg_get_vel_n(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  12);
}

/**
 * @brief Get field vel_e from xap_sbg_gps_vel_msg message
 *
 * @return   Velocity in East direction, m/s 
 */
static inline float mavlink_msg_xap_sbg_gps_vel_msg_get_vel_e(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  16);
}

/**
 * @brief Get field vel_d from xap_sbg_gps_vel_msg message
 *
 * @return   Velocity in Down direction, m/s 
 */
static inline float mavlink_msg_xap_sbg_gps_vel_msg_get_vel_d(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  20);
}

/**
 * @brief Get field vel_acc_n from xap_sbg_gps_vel_msg message
 *
 * @return   1b Accuracy in North direction, m/s 
 */
static inline float mavlink_msg_xap_sbg_gps_vel_msg_get_vel_acc_n(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  24);
}

/**
 * @brief Get field vel_acc_e from xap_sbg_gps_vel_msg message
 *
 * @return   1b Accuracy in East direction, m/s 
 */
static inline float mavlink_msg_xap_sbg_gps_vel_msg_get_vel_acc_e(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  28);
}

/**
 * @brief Get field vel_acc_d from xap_sbg_gps_vel_msg message
 *
 * @return   1b Accuracy in Down direction, m/s 
 */
static inline float mavlink_msg_xap_sbg_gps_vel_msg_get_vel_acc_d(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  32);
}

/**
 * @brief Get field course from xap_sbg_gps_vel_msg message
 *
 * @return   True direction of motion over ground (0 to 360 deg), deg 
 */
static inline float mavlink_msg_xap_sbg_gps_vel_msg_get_course(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  36);
}

/**
 * @brief Get field course_acc from xap_sbg_gps_vel_msg message
 *
 * @return   1b course accuracy (0 to 360 deg), deg 
 */
static inline float mavlink_msg_xap_sbg_gps_vel_msg_get_course_acc(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  40);
}

/**
 * @brief Decode a xap_sbg_gps_vel_msg message into a struct
 *
 * @param msg The message to decode
 * @param xap_sbg_gps_vel_msg C-struct to decode the message contents into
 */
static inline void mavlink_msg_xap_sbg_gps_vel_msg_decode(const mavlink_message_t* msg, mavlink_xap_sbg_gps_vel_msg_t* xap_sbg_gps_vel_msg)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    xap_sbg_gps_vel_msg->time_boot_ms = mavlink_msg_xap_sbg_gps_vel_msg_get_time_boot_ms(msg);
    xap_sbg_gps_vel_msg->gps_vel_status = mavlink_msg_xap_sbg_gps_vel_msg_get_gps_vel_status(msg);
    xap_sbg_gps_vel_msg->gps_tow = mavlink_msg_xap_sbg_gps_vel_msg_get_gps_tow(msg);
    xap_sbg_gps_vel_msg->vel_n = mavlink_msg_xap_sbg_gps_vel_msg_get_vel_n(msg);
    xap_sbg_gps_vel_msg->vel_e = mavlink_msg_xap_sbg_gps_vel_msg_get_vel_e(msg);
    xap_sbg_gps_vel_msg->vel_d = mavlink_msg_xap_sbg_gps_vel_msg_get_vel_d(msg);
    xap_sbg_gps_vel_msg->vel_acc_n = mavlink_msg_xap_sbg_gps_vel_msg_get_vel_acc_n(msg);
    xap_sbg_gps_vel_msg->vel_acc_e = mavlink_msg_xap_sbg_gps_vel_msg_get_vel_acc_e(msg);
    xap_sbg_gps_vel_msg->vel_acc_d = mavlink_msg_xap_sbg_gps_vel_msg_get_vel_acc_d(msg);
    xap_sbg_gps_vel_msg->course = mavlink_msg_xap_sbg_gps_vel_msg_get_course(msg);
    xap_sbg_gps_vel_msg->course_acc = mavlink_msg_xap_sbg_gps_vel_msg_get_course_acc(msg);
    xap_sbg_gps_vel_msg->sbg_id = mavlink_msg_xap_sbg_gps_vel_msg_get_sbg_id(msg);
    xap_sbg_gps_vel_msg->gps_id = mavlink_msg_xap_sbg_gps_vel_msg_get_gps_id(msg);
#else
        uint8_t len = msg->len < MAVLINK_MSG_ID_XAP_SBG_GPS_VEL_MSG_LEN? msg->len : MAVLINK_MSG_ID_XAP_SBG_GPS_VEL_MSG_LEN;
        memset(xap_sbg_gps_vel_msg, 0, MAVLINK_MSG_ID_XAP_SBG_GPS_VEL_MSG_LEN);
    memcpy(xap_sbg_gps_vel_msg, _MAV_PAYLOAD(msg), len);
#endif
}
